<extend name="Base/common"/>

<block name="header">
    <!-- <header class=" subhead" id="overview"> -->
        <!-- <div class="container"> -->
            <!-- <h2>Hey Joke</h2> -->
            <!-- <p class="lead"></p> -->
        <!-- </div> -->
    <!-- </header> -->
</block>

<block name="side">
<!-- 左侧 nav
================================================== -->
    <include file="Public/left_bar"/>
</block>

<block name="body">
    <div class="span9">
        <!-- Contents
        ================================================== -->
        <section id="contents">

<h1>{$year}-{$month}</h1>
            <table class="table table-hover">
                <tr>
                    <td>周日</td>
                    <td>周一</td>
                    <td>周二</td>
                    <td>周三</td>
                    <td>周四</td>
                    <td>周五</td>
                    <td>周六</td>
                </tr>
                <volist name="table" id="vo">
                    <tr>
                        <volist name="vo" id="item">
                        <td>
                            <gt name="item.text" value="0">
                            {$item.text} <br>
                            上班:<gt name="item.on" value="0">
                                {$item.on|date="H:i",###}<else/>
                                <span style="color: red">缺</span></gt><br/>
                           下班:<gt name="item.off" value="0">
                                {$item.off|date="H:i",###}<else/>
                                <span style="color: red">缺</span></gt>

</gt>

                        </td>
                            </volist>

                    </tr>
                </volist>

            </table>



        </section>
    </div>
        </div>
    <script>
        $(document).ready(function(){
            $(".qiandao").click(function(){
                var obj = $(this);
                $.post("{:U('Daily/do_active')}",{},function(msg){
                    obj.attr('value',msg.info);
                    if(msg.status==200){
                        obj.removeClass('btn-info');
                        obj.addClass('btn-success');
                    } else {
                        obj.removeClass('btn-info');
                        obj.addClass('btn-danger');
                    }
                },'json');
            });
            $(".qiantui").click(function(){
                var obj = $(this);
                $.post("{:U('Daily/off_active')}",{},function(msg){
                    obj.attr('value',msg.info);
                    if(msg.status==200){
                        obj.removeClass('btn-info');
                        obj.addClass('btn-success');
                    } else {
                        obj.removeClass('btn-info');
                        obj.addClass('btn-danger');
                    }
                },'json');
            });
        });



    </script>
</block>


